using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using DTO;
using System.Data;

namespace HeThongDAO
{
    public class TacGiaSachDAO
    {
        public static void ThemTacGiaSach(TacGiaSachDTO tgs)
        {
            string sql = "insert into TAC_GIA_SACH(MaSach,MaTacGia) values(@masach,@matacgia)";
            sql = sql.Replace("@masach", tgs.MaSach.ToString());
            sql = sql.Replace("@matacgia", tgs.MaTacGia.ToString());
            Config.AccessHelper.ExecuteNonQuery(sql);
        }
        public static void XoaSach(TacGiaSachDTO tgs)
        {
            string sql = "DELETE FROM TAC_GIA_SACH WHERE MaSach=@masach";
            sql = sql.Replace("@masach", tgs.MaSach.ToString());
            Config.AccessHelper.ExecuteNonQuery(sql);
        }
    }
}
